Repository navigation
Conversation
Five checks, the same shape as Gin because the failures are the same shape: a router that starts bare, a convenience method that skips the server settings that matter, and defaults about client addresses that are wrong in one direction or the other. Recovery is critical here for a sharper reason than in Gin. A new Echo instance comes with no middleware at all, so nothing recovers a panic unless someone registered it, and an unrecovered panic ends the process rather than the request. The client address check is the one that differs. Reading the forwarded header without naming trusted proxies lets any caller claim any address, and reading the direct address behind a proxy records the proxy for everyone. Both defaults are wrong somewhere, so the check asks for a deliberate choice rather than a particular value. References were verified with the link checker's own method rather than curl, after gnu.org turned out to answer one and not the other. One candidate page returned 404 and was dropped before being cited.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tier 2, item 4.
universal → go → web → go.echo, 5 new checks.Same shape as Gin, because the failures are the same shape: a router that starts
bare, a convenience method that skips the server settings that matter, and
defaults about client addresses that are wrong in one direction or the other.
recover-middleware-presentserver-timeouts-sete.Start()runs a server with no timeoutsdebug-mode-offclient-ip-extraction-trustedrequest-body-boundedThe client-address check is the interesting one
Echo differs from Gin here, and it is the one place I did not copy the Gin check
across. Reading the forwarded header without naming trusted proxies lets any
caller claim any address. Reading the direct address while behind a proxy
records the proxy for every request. Both defaults are wrong somewhere, so
the check asks for a deliberate choice with trust ranges rather than asserting a
particular value.
Verification
Both directions, as usual — a
bad.gowithecho.New(),e.Debug = trueand abare
e.Start(":8080"), and agood.gowith recover, body limit, an IPextractor with trust options and an explicit
http.Servercarrying timeouts.Each command separated them.
References checked with Node's
fetch, not curl — the rule that came out ofthe Shell PR. One candidate page (
/docs/cookbook/http-server) returned 404 andwas dropped before being cited rather than after.